home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / QuickDraw GX / QuickDraw GX Info / QuickDraw GX Interfaces / Interfaces & Libraries / Pascal Interfaces & Libraries / Pascal Example / graphics app.p next >
Encoding:
Text File  |  1994-04-01  |  869 b   |  35 lines  |  [TEXT/MPS ]

  1. PROGRAM GraphicsApp;
  2.  
  3. USES
  4.  ToolIntf, Types,     GraphicsToolbox, GraphicsMacintosh, GraphicsDebugging, LayoutRoutines, MathRoutines, GraphicsRoutines, FontRoutines;
  5.  
  6. VAR
  7.     myRectangle:    gxRectangle;
  8.     myShape:            gxShape;
  9.     looper:                integer;
  10.     curColor:            gxColor;
  11.  
  12. BEGIN
  13.     GXEnterGraphics;
  14.     myRectangle.top := $640000; { ff(100) }
  15.     myRectangle.left := $640000;
  16.     myRectangle.right := $C80000; { ff(200) }
  17.     myRectangle.bottom := $C80000;
  18.     myShape := GXNewRectangle(@myRectangle);
  19.     GXMoveShape(myShape, $640000, $640000);
  20.     
  21.     curColor.space := gxHSVSpace;
  22.     curColor.profile := NIL;
  23.  
  24.     FOR looper := 1 TO 36 DO
  25.         BEGIN
  26.         GXRotateShape(myShape, $140000, $1200000, $1200000);
  27.         curColor.hsv.hue := looper * 1500;
  28.         curColor.hsv.saturation := 65535;
  29.         curColor.hsv.value := 32767;
  30.         GXSetShapeColor(myShape, @curColor);
  31.         GXDrawShape(myShape);
  32.         END;
  33.         
  34.     GXDisposeShape(myShape);
  35. END.